package com.example.androidstart.opengl.camera;

import android.graphics.Point;
import android.graphics.SurfaceTexture;
import android.hardware.Camera;

import java.util.Optional;

public class CameraKit implements ICamera {
    private Camera mCamera;

    public CameraKit() {
    }

    @Override
    public Camera open(int cameraId) {
        try {
            mCamera = Camera.open(cameraId);
        } catch (Exception e) {
            return null;
        }
        return mCamera;
    }

    @Override
    public void setConfig(Config config) {

    }

    @Override
    public boolean preview() {
        return false;
    }

    @Override
    public boolean switchTo(int cameraId) {
        return false;
    }

    @Override
    public void takePhoto(TakePhotoCallback callback) {

    }

    @Override
    public boolean close() {
        return false;
    }

    @Override
    public void setPreviewTexture(SurfaceTexture texture) {

    }

    @Override
    public Point getPreviewSize() {
        return null;
    }

    @Override
    public Point getPictureSize() {
        return null;
    }

    @Override
    public void setOnPreviewFrameCallback(PreviewFrameCallback callback) {

    }
}
